package com.autonavi.yunda.yunji.domain;

import com.autonavi.yunda.yunji.core.enums.SqlOpEnum;
import lombok.Data;

import java.util.List;

/**
 * @Created by lufei on 2022-07-04.
 */

@Data
public class OrmTableParam {

    /**
     * 基础字段
     */
    private Base base;

    /**
     * 字段
     */
    private List<Field> field;

    /**
     * where 子句
     */
    private List<Where> where;

    /**
     * 排序
     */
    private List<Order> order;

    /**
     * 分页
     */
    private Page page;

    @Data
    public static class Base {
        private String db;
        private String tb;
        private SqlOpEnum op;
    }

    @Data
    public static class Field {
        private String field;
        private String val;
        private String condition;
    }

    @Data
    public static class Where extends Field {
        private String condition;
    }

    @Data
    public static class Order extends Field {
        private String order;
    }

    @Data
    public static class Page {
        private String start;
        private String offset;
    }

}
